<!DOCTYPE html>
{extend name="../application/public/base.html" /}
{block name="head"}
    <link rel="stylesheet" href="ADMIN_CUSTOM/css/btn.css">
    <link rel="stylesheet" href="ADMIN_CUSTOM/css/form.css">
{/block}
{block name="body"}
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
							<div class="layui-tab-content tab-content-form">
                                <div class="layui-btn" onclick="query({$row.user_id})" style="margin-left: 90%;">确定</div>
								<div class="layui-tab-content" id="user-box" style="height: 320px;">
									<div class="user-img">
                                        {if condition="$row.user_img == '' "}
										<img src="ADMIN_CUSTOM/image/user_img.png">
                                        {else}
                                        <img src="{$row.user_img}">
                                        {/if}
									</div>
									<ul class="user-info">
										<li>客户编号：{$row.user_sn}</li>
										<li>客户类型：{$row.u_type}</li>
										<li>客户姓名：{$row.username}</li>
										<li>客户称呼：{$row.nkname}</li>
										<li>性别：{$row.sex}</li>
										<li>年龄：{$row.age}</li>
										<li>联系方式：{$row.phone}</li>
										<li>备用联系方式：{$row.spare_phone}</li>
									</ul>
								</div>
						  	</div>
                        </div>
                    </div>
                </div>
            </div>
        </div> 
    </body>
{/block}
{block name="script"}
    <script type="text/javascript">
        layui.use(['layer'],function(){
            var table = layui.table;
            var layer = layui.layer;
            var $ = layui.$;
            /*@确认*/
            query = function(ids){
                $.get('/user/user/details/ids/'+ids,{},function(data){
                    if(data.code !== 1){
                        layer.msg(data.msg, {icon: 5})
                    }else{
                        window.parent.$("input[name='username']").val(data.msg.username);
                        window.parent.$("input[name='nkname']").val(data.msg.nkname);
                        window.parent.$("input[name='phone']").val(data.msg.phone);
                        window.parent.$("input[name='spare_phone']").val(data.msg.spare_phone);
                        window.parent.$("input[name='user_sn']").val(data.msg.user_sn);
                        var user_info = '<span class="chakan span_nav" style="cursor:pointer;" onclick="xadmin.open(\'客户详情\',\'/user/user/details/ids/'+data.msg.user_sn+'\')">'+data.msg.user_sn+'</span>';
                        window.parent.$("#user-sn").html(user_info);
                        xadmin.close();
                    }
                })
                
            }
        })
    </script>
{/block}